package sort;

import java.util.Random;

public class GenNums {
    public static int[] rank(int len) {
        int[] nums = new int[len];
        for (int i = 0; i < len; i++) {
            Random random = new Random();
            nums[i] = random.nextInt(len*10);
        }
        return nums;
    }

    public static void printNums (int[] nums) {
        for (int i = 0; i < nums.length; i++) {
            if (i == nums.length - 1) {
                System.out.println(nums[i]);
            } else {
                System.out.print(nums[i]+",");
            }
        }
    }

    public static boolean check (int[] nums) {
        for (int i = 1; i < nums.length; i++) {
            if (nums[i - 1] > nums[i]) return false;
        }
        return true;
    }
}
